package com.zhixue.r;

import lombok.*;

/**
 * @Auther: 李 力
 * @Date: 2025/4/11
 * @Description: com.zhixue.content.r
 * @version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class R {
    private int code;
    private String msg;
    private Object data;

    public static R ok() {
        return new R(200, "成功", null);
    }

    public static R ok(Object data) {
        return new R(200, "成功", data);
    }

    public static R fail() {
        return new R(500, "失败", null);
    }
}